package typejump.commands;

import typejump.TypeJump;
import typejump.engine.GameEngine;
import typejump.objects.Actor;
import typejump.objects.GameObject;

public class DevKill implements TextCommand {

	@Override
	public boolean matches(String command) {
		return command.equals("dev kill");
	}

	@Override
	public void act(String command) {
		TypeJump tj = TypeJump.getInst();
		GameObject go = GameEngine.getObjectAt(tj.getMouseX(), tj.getMouseY());
		if (go != null && go instanceof Actor) {
			((Actor)go).die();
		}
	}

}
